<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
<meta name="keywords" content="董哲朋,博客,杰森,工程师杰森,攻城狮杰森,程序员杰森,jason,jasoncoding,pdpeng.github.io,coder-jason,杰森,工程师,攻城狮,程序员,blog,杰森的博客,全栈杰森,Jason,全栈">
<meta name="description" content="董哲朋的个人技术博客，进军 BAT">
<meta name="baidu-site-verification" content="code-QreKZHvhxr" />
<meta name="google-site-verification" content="09pUELCUBq1DqCCF38Yh2tJ3Ym_AwCrftq7Nuj6RFKU" />
<meta name="baidu-site-verification" content="code-UgQbVCF7gr" />
<meta name="google-site-verification" content="2Z5MbRq2MYkpxhxZigsnWu_02ovzdGiRJNOzHc_yq58" />
<meta name="sogou_site_verification" content="kR3XmMWqhc" />
<meta name="viewport" content="width=device-width">
<meta name="referrer" content="no-referrer" /> <!--临时解决防盗链-->
<meta name="theme-color" content="#222" media="(prefers-color-scheme: light)">
<meta name="theme-color" content="#222" media="(prefers-color-scheme: dark)"><meta name="generator" content="Hexo 6.3.0">

<link rel="preconnect" href="null//null" crossorigin>
<link rel="preconnect" href="https://cdn.jsdelivr.net" crossorigin>
  <link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png">
  <link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png">
  <link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.png">
  <link rel="mask-icon" href="/images/logo.svg" color="#222">
  <meta name="google-site-verification" content="yRcH84LYotQhqYFJcwA5UzGRX_E_HGt7EWyA1hBqqWU">
  <meta name="msvalidate.01" content="yRcH84LYotQhqYFJcwA5UzGRX_E_HGt7EWyA1hBqqWU">
  <meta name="yandex-verification" content="8db608d56597d365">
  <meta name="baidu-site-verification" content="code-SSriojapxO">

<link rel="stylesheet" href="/css/main.css">



<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free@6.1.1/css/all.min.css" integrity="sha256-DfWjNxDkM94fVBWx1H5BMMp0Zq7luBlV8QRcSES7s+0=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/animate.css@3.1.1/animate.min.css" integrity="sha256-PR7ttpcvz8qrF57fur/yAx1qXMFJeJFiA6pSzWi0OIE=" crossorigin="anonymous">
  <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.css" integrity="sha256-Vzbj7sDDS/woiFS3uNKo8eIuni59rjyNGtXfstRzStA=" crossorigin="anonymous">

<script class="next-config" data-name="main" type="application/json">{"hostname":"pdpeng.github.io","root":"/","images":"/images","scheme":"Mist","darkmode":true,"version":"8.11.1","exturl":true,"sidebar":{"position":"left","display":"post","padding":18,"offset":12},"copycode":true,"bookmark":{"enable":false,"color":"#222","save":"manual"},"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":"utterances","storage":true,"lazyload":true,"nav":null,"activeClass":"utterances"},"stickytabs":false,"motion":{"enable":true,"async":false,"transition":{"post_block":"fadeIn","post_header":"fadeInDown","post_body":"fadeInDown","coll_header":"fadeInLeft","sidebar":"fadeInUp"}},"prism":false,"i18n":{"placeholder":"搜索...","empty":"没有找到任何搜索结果：${query}","hits_time":"找到 ${hits} 个搜索结果（用时 ${time} 毫秒）","hits":"找到 ${hits} 个搜索结果"},"path":"/search.xml","localsearch":{"enable":true,"trigger":"auto","top_n_per_article":1,"unescape":false,"preload":false}}</script><script src="/js/config.js"></script>



<link rel="canonical" href="https://pdpeng.github.io/2022/03/22/idea-eclips-web-project/">



<script class="next-config" data-name="page" type="application/json">{"sidebar":"","isHome":false,"isPost":true,"lang":"zh-CN","comments":true,"permalink":"https://pdpeng.github.io/2022/03/22/idea-eclips-web-project/","path":"2022/03/22/idea-eclips-web-project/","title":"idea 及 eclipse 配置 Tomcat 并发布 Web 项目"}</script>

<script class="next-config" data-name="calendar" type="application/json">""</script>
<title>idea 及 eclipse 配置 Tomcat 并发布 Web 项目 | 攻城狮杰森</title>
  
    <script async src="https://www.googletagmanager.com/gtag/js?id=G-5S6WNTLJG7"></script>
  <script class="next-config" data-name="google_analytics" type="application/json">{"tracking_id":"G-5S6WNTLJG7","only_pageview":false}</script>
  <script src="/js/third-party/analytics/google-analytics.js"></script>

  <script src="/js/third-party/analytics/baidu-analytics.js"></script>
  <script async src="https://hm.baidu.com/hm.js?11b3816992997637c6abc9c18c3eb3e5"></script>

  <script async src="//assets.growingio.com/2.1/gio.js"></script>
  <script class="next-config" data-name="growingio_analytics" type="application/json">"88ac8d4f08101068"</script>
  <script src="/js/third-party/analytics/growingio.js"></script>



  <noscript>
    <link rel="stylesheet" href="/css/noscript.css">
  </noscript>
<link rel="alternate" href="/atom.xml" title="攻城狮杰森" type="application/atom+xml">
</head>

<body itemscope itemtype="http://schema.org/WebPage" class="use-motion">
  <div class="headband"></div>

  <main class="main">
    <header class="header" itemscope itemtype="http://schema.org/WPHeader">
      <div class="header-inner"><div class="site-brand-container">
  <div class="site-nav-toggle">
    <div class="toggle" aria-label="切换导航栏" role="button">
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
        <span class="toggle-line"></span>
    </div>
  </div>

  <div class="site-meta">

    <a href="/" class="brand" rel="start">
      <i class="logo-line"></i>
      <p class="site-title">攻城狮杰森</p>
      <i class="logo-line"></i>
    </a>
      <p class="site-subtitle" itemprop="description">董哲朋的博客</p>
  </div>

  <div class="site-nav-right">
    <div class="toggle popup-trigger">
        <i class="fa fa-search fa-fw fa-lg"></i>
    </div>
  </div>
</div>



<nav class="site-nav">
  <ul class="main-menu menu"><li class="menu-item menu-item-home"><a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a></li><li class="menu-item menu-item-categories"><a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类<span class="badge">22</span></a></li><li class="menu-item menu-item-archives"><a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档<span class="badge">105</span></a></li><li class="menu-item menu-item-tags"><a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签<span class="badge">28</span></a></li><li class="menu-item menu-item-about"><a href="/about/" rel="section"><i class="fa fa-user fa-fw"></i>关于</a></li>
      <li class="menu-item menu-item-search">
        <a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
        </a>
      </li>
  </ul>
</nav>



  <div class="search-pop-overlay">
    <div class="popup search-popup"><div class="search-header">
  <span class="search-icon">
    <i class="fa fa-search"></i>
  </span>
  <div class="search-input-container">
    <input autocomplete="off" autocapitalize="off" maxlength="80"
           placeholder="搜索..." spellcheck="false"
           type="search" class="search-input">
  </div>
  <span class="popup-btn-close" role="button">
    <i class="fa fa-times-circle"></i>
  </span>
</div>
<div class="search-result-container no-result">
  <div class="search-result-icon">
    <i class="fa fa-spinner fa-pulse fa-5x"></i>
  </div>
</div>

    </div>
  </div>

</div>
        
  
  <div class="toggle sidebar-toggle" role="button">
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
    <span class="toggle-line"></span>
  </div>

  <aside class="sidebar">

    <div class="sidebar-inner sidebar-nav-active sidebar-toc-active">
      <ul class="sidebar-nav">
        <li class="sidebar-nav-toc">
          文章目录
        </li>
        <li class="sidebar-nav-overview">
          站点概览
        </li>
      </ul>

      <div class="sidebar-panel-container">
        <!--noindex-->
        <div class="post-toc-wrap sidebar-panel">
            <div class="post-toc animated"><ol class="nav"><li class="nav-item nav-level-1"><a class="nav-link" href="#tomcat-%E5%AE%89%E8%A3%85%E9%85%8D%E7%BD%AE"><span class="nav-number">1.</span> <span class="nav-text">tomcat 安装配置</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E7%AE%80%E4%BB%8B"><span class="nav-number">1.1.</span> <span class="nav-text">简介</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%B8%8B%E8%BD%BD%E5%AE%89%E8%A3%85"><span class="nav-number">1.2.</span> <span class="nav-text">下载安装</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E7%B3%BB%E7%BB%9F%E7%8E%AF%E5%A2%83%E9%85%8D%E7%BD%AE"><span class="nav-number">1.3.</span> <span class="nav-text">系统环境配置</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%BC%98%E5%8C%96%E9%85%8D%E7%BD%AE"><span class="nav-number">1.4.</span> <span class="nav-text">优化配置</span></a><ol class="nav-child"><li class="nav-item nav-level-3"><a class="nav-link" href="#%E4%BF%AE%E6%94%B9%E9%BB%98%E8%AE%A4%E5%86%85%E5%AD%98"><span class="nav-number">1.4.1.</span> <span class="nav-text">修改默认内存</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E7%AE%A1%E7%90%86%E5%91%98%E7%94%A8%E6%88%B7%E5%90%8D%E5%92%8C%E5%AF%86%E7%A0%81%E8%AE%BE%E7%BD%AE"><span class="nav-number">1.4.2.</span> <span class="nav-text">管理员用户名和密码设置</span></a></li><li class="nav-item nav-level-3"><a class="nav-link" href="#%E6%94%AF%E6%8C%81%E4%B8%AD%E6%96%87%E6%96%87%E4%BB%B6%E5%90%8D%E7%A7%B0"><span class="nav-number">1.4.3.</span> <span class="nav-text">支持中文文件名称</span></a></li></ol></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#idea-%E9%85%8D%E7%BD%AE-tomcat-%E5%B9%B6%E5%8F%91%E5%B8%83-web-%E9%A1%B9%E7%9B%AE"><span class="nav-number">2.</span> <span class="nav-text">idea 配置 tomcat 并发布 web 项目</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E9%A1%B9%E7%9B%AE%E5%88%9B%E5%BB%BA"><span class="nav-number">2.1.</span> <span class="nav-text">项目创建</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E4%B8%BA%E9%A1%B9%E7%9B%AE%E6%B7%BB%E5%8A%A0-tomcat"><span class="nav-number">2.2.</span> <span class="nav-text">为项目添加 tomcat</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%8F%91%E5%B8%83%E6%B5%8B%E8%AF%95"><span class="nav-number">2.3.</span> <span class="nav-text">发布测试</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#eclipse-%E9%85%8D%E7%BD%AE-tomcat-%E5%B9%B6%E5%8F%91%E5%B8%83-web-%E9%A1%B9%E7%9B%AE"><span class="nav-number">3.</span> <span class="nav-text">eclipse 配置 tomcat 并发布 web 项目</span></a><ol class="nav-child"><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%BC%95%E5%85%A5-tomcat"><span class="nav-number">3.1.</span> <span class="nav-text">引入 tomcat</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%BB%BA%E7%AB%8B-web-%E9%A1%B9%E7%9B%AE"><span class="nav-number">3.2.</span> <span class="nav-text">建立 web 项目</span></a></li><li class="nav-item nav-level-2"><a class="nav-link" href="#%E5%8F%91%E5%B8%83%E6%B5%8B%E8%AF%95-1"><span class="nav-number">3.3.</span> <span class="nav-text">发布测试</span></a></li></ol></li><li class="nav-item nav-level-1"><a class="nav-link" href="#%E6%80%BB%E7%BB%93"><span class="nav-number">4.</span> <span class="nav-text">总结</span></a></li></ol></div>
        </div>
        <!--/noindex-->

        <div class="site-overview-wrap sidebar-panel">
          <div class="site-author site-overview-item animated" itemprop="author" itemscope itemtype="http://schema.org/Person">
    <a href="/">
    <img class="site-author-image" itemprop="image" alt="董哲朋"
      src="/images/head_portrait.png">
    </a>
  <p class="site-author-name" itemprop="name">董哲朋</p>
  <div class="site-description" itemprop="description" style="padding-bottom: 8px">A blacksmith must be strong</div>

<html>
<head>
    <style>
        .chat-button div {
            display: block;
            margin-top: 5px;
            background-color: transparent;
            position: relative;
            font-family: 'Lato', "PingFang SC", "Microsoft YaHei", sans-serif;
            font-size: 14px;
            line-height: 2;
        }

        .feed-link a {
            display: inline-block;
            padding: 0 15px;
            color: #fc6423;
            border: 2px solid #fc6423;
            border-radius: 6px;
            text-decoration: none;
        }

        .feed-link a:hover {
            background-color: #fc6423;
            border-bottom-color: #fc6423;
            color: #fff;
        }
    </style>
</head>

<body class="chat-button">
    <div class="feed-link" title="Q&A → Blog-Jason/community">
        <a target="_blank" rel="noopener" href="https://gitter.im/Blog-Jason/community">
            Q&A
        </a>
    </div>
</body>
</html>

</div>
<div class="site-state-wrap site-overview-item animated">
  <nav class="site-state">
      <div class="site-state-item site-state-posts">
        <a href="/archives/">
          <span class="site-state-item-count">105</span>
          <span class="site-state-item-name">日志</span>
        </a>
      </div>
      <div class="site-state-item site-state-categories">
          <a href="/categories/">
        <span class="site-state-item-count">22</span>
        <span class="site-state-item-name">分类</span></a>
      </div>
      <div class="site-state-item site-state-tags">
          <a href="/tags/">
        <span class="site-state-item-count">28</span>
        <span class="site-state-item-name">标签</span></a>
      </div>
  </nav>
</div>
  <div class="links-of-author site-overview-item animated">
      <span class="links-of-author-item">
        <span class="exturl" data-url="aHR0cHM6Ly93d3cubGlua2VkaW4uY29tL2luL2Rvbmd6aGVwZW5n" title="Linkedin → https:&#x2F;&#x2F;www.linkedin.com&#x2F;in&#x2F;dongzhepeng"><i class="fab fa-linkedin fa-fw"></i>Linkedin</span>
      </span>
      <span class="links-of-author-item">
        <span class="exturl" data-url="aHR0cHM6Ly90d2l0dGVyLmNvbS9qYXNvbmk5OTY=" title="Twitter → https:&#x2F;&#x2F;twitter.com&#x2F;jasoni996"><i class="fab fa-twitter fa-fw"></i>Twitter</span>
      </span>
      <span class="links-of-author-item">
        <span class="exturl" data-url="bWFpbHRvOmR6aGVwZW5nQGdtYWlsLmNvbQ==" title="E-Mail → mailto:dzhepeng@gmail.com"><i class="fa fa-envelope fa-fw"></i>E-Mail</span>
      </span>
      <span class="links-of-author-item">
        <span class="exturl" data-url="aHR0cHM6Ly9zdGFja292ZXJmbG93LmNvbS91c2Vycy8xNjY0ODc1NA==" title="S.O. → https:&#x2F;&#x2F;stackoverflow.com&#x2F;users&#x2F;16648754"><i class="fab fa-stack-overflow fa-fw"></i>S.O.</span>
      </span>
      <span class="links-of-author-item">
        <a href="/atom.xml" title="RSS → &#x2F;atom.xml"><i class="fa fa-rss fa-fw"></i>RSS</a>
      </span>
      <span class="links-of-author-item">
        <span class="exturl" data-url="aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L20wXzUxMjY5OTYx" title="CSDN → https:&#x2F;&#x2F;blog.csdn.net&#x2F;m0_51269961"><i class="fa-solid fa-c fa-fw"></i>CSDN</span>
      </span>
  </div>
  <div class="cc-license site-overview-item animated" itemprop="license">
    <span class="exturl cc-opacity" data-url="aHR0cHM6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL2J5LW5jLXNhLzQuMC8="><img src="https://cdn.jsdelivr.net/npm/@creativecommons/vocabulary@2020.11.3/assets/license_badges/small/by_nc_sa.svg" alt="Creative Commons"></span>
  </div>



        </div>
      </div>

      
      <script type="text/javascript" charset="utf-8" src="/js/tagcloud.js"></script>
      <script type="text/javascript" charset="utf-8" src="/js/tagcanvas.js"></script>
      <div class="widget-wrap">
          <div id="myCanvasContainer" class="widget tagcloud">
              <canvas width="250" height="250" id="resCanvas" style="width:100%">
                  <ul class="tag-list" itemprop="keywords"><li class="tag-list-item"><a class="tag-list-link" href="/tags/ACM/" rel="tag">ACM</a><span class="tag-list-count">32</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/C/" rel="tag">C++</a><span class="tag-list-count">4</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/CDN/" rel="tag">CDN</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/CPU/" rel="tag">CPU</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/DNS/" rel="tag">DNS</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Git/" rel="tag">Git</a><span class="tag-list-count">9</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/HarmonyOS/" rel="tag">HarmonyOS</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Hexo/" rel="tag">Hexo</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/IOS/" rel="tag">IOS</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Java/" rel="tag">Java</a><span class="tag-list-count">9</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Linux/" rel="tag">Linux</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Markdown/" rel="tag">Markdown</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/MySQL/" rel="tag">MySQL</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Python/" rel="tag">Python</a><span class="tag-list-count">4</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/RT-Thread/" rel="tag">RT-Thread</a><span class="tag-list-count">3</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/SQLServer/" rel="tag">SQLServer</a><span class="tag-list-count">9</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/TCP-IP/" rel="tag">TCP&#x2F;IP</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Tomcat/" rel="tag">Tomcat</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/Vivado/" rel="tag">Vivado</a><span class="tag-list-count">2</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E4%BA%91%E5%AD%98%E5%82%A8/" rel="tag">云存储</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E5%89%8D%E7%AB%AF/" rel="tag">前端</a><span class="tag-list-count">6</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E6%9C%8D%E5%8A%A1%E5%99%A8/" rel="tag">服务器</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E7%A8%8B%E5%BA%8F%E4%BA%BA%E7%94%9F/" rel="tag">程序人生</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E7%BC%96%E7%A0%81/" rel="tag">编码</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E8%81%8C%E4%B8%9A%E8%AE%A4%E8%AF%81/" rel="tag">职业认证</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E8%A7%A3%E5%86%B3%E6%96%B9%E6%A1%88/" rel="tag">解决方案</a><span class="tag-list-count">6</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E8%A7%A3%E6%9E%90%E5%87%A0%E4%BD%95/" rel="tag">解析几何</a><span class="tag-list-count">1</span></li><li class="tag-list-item"><a class="tag-list-link" href="/tags/%E8%AE%A1%E7%AE%97%E6%9C%BA%E8%A7%86%E8%A7%89/" rel="tag">计算机视觉</a><span class="tag-list-count">1</span></li></ul>
              </canvas>
          </div>
      </div>
      
        <div class="back-to-top animated" role="button" aria-label="返回顶部">
          <i class="fa fa-arrow-up"></i>
          <span>0%</span>
        </div>
    </div>
  </aside>
  <div class="sidebar-dimmer"></div>


    </header>

    
  <div class="reading-progress-bar"></div>

  <span class="exturl github-corner" data-url="aHR0cHM6Ly9naXRodWIuY29tL1BEUEVORw==" title="Follow Jason on GitHub" aria-label="Follow Jason on GitHub"><svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></span>

<noscript>
  <div class="noscript-warning">Theme NexT works best with JavaScript enabled</div>
</noscript>


    <div class="main-inner post posts-expand">


  


<div class="post-block">
  
  

  <article itemscope itemtype="http://schema.org/Article" class="post-content" lang="zh-CN">
    <link itemprop="mainEntityOfPage" href="https://pdpeng.github.io/2022/03/22/idea-eclips-web-project/">

    <span hidden itemprop="author" itemscope itemtype="http://schema.org/Person">
      <meta itemprop="image" content="/images/head_portrait.png">
      <meta itemprop="name" content="董哲朋">
    </span>

    <span hidden itemprop="publisher" itemscope itemtype="http://schema.org/Organization">
      <meta itemprop="name" content="攻城狮杰森">
      <meta itemprop="description" content="A blacksmith must be strong">
    </span>

    <span hidden itemprop="post" itemscope itemtype="http://schema.org/CreativeWork">
      <meta itemprop="name" content="idea 及 eclipse 配置 Tomcat 并发布 Web 项目 | 攻城狮杰森">
      <meta itemprop="description" content="">
    </span>
      <header class="post-header">
        <h1 class="post-title" itemprop="name headline">
          idea 及 eclipse 配置 Tomcat 并发布 Web 项目
        </h1>

        <div class="post-meta-container">
          <div class="post-meta">
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-calendar"></i>
      </span>
      <span class="post-meta-item-text">发表于</span>

      <time title="创建时间：2022-03-22 17:32:25" itemprop="dateCreated datePublished" datetime="2022-03-22T17:32:25+08:00">2022-03-22</time>
    </span>
    <span class="post-meta-item">
      <span class="post-meta-item-icon">
        <i class="far fa-folder"></i>
      </span>
      <span class="post-meta-item-text">分类于</span>
        <span itemprop="about" itemscope itemtype="http://schema.org/Thing">
          <a href="/categories/Java-Web/" itemprop="url" rel="index"><span itemprop="name">Java Web</span></a>
        </span>
    </span>

  
    <span id="/2022/03/22/idea-eclips-web-project/" class="post-meta-item leancloud_visitors" data-flag-title="idea 及 eclipse 配置 Tomcat 并发布 Web 项目" title="阅读次数">
      <span class="post-meta-item-icon">
        <i class="far fa-eye"></i>
      </span>
      <span class="post-meta-item-text">阅读次数：</span>
      <span class="leancloud-visitors-count"></span>
    </span>
    <span class="post-meta-break"></span>
    <span class="post-meta-item" title="本文字数">
      <span class="post-meta-item-icon">
        <i class="far fa-file-word"></i>
      </span>
      <span class="post-meta-item-text">本文字数：</span>
      <span>2.9k</span>
    </span>
    <span class="post-meta-item" title="阅读时长">
      <span class="post-meta-item-icon">
        <i class="far fa-clock"></i>
      </span>
      <span class="post-meta-item-text">阅读时长 &asymp;</span>
      <span>3 分钟</span>
    </span>
</div>

        </div>
      </header>

    
    
    
    <div class="post-body" itemprop="articleBody">
        <blockquote>
<p>本篇内容主要讲述如何在 idea 和 eclipse 开发工具中配置 Tomcat，记录一些踩坑的地方，帮大家避坑，节约时间</p>
</blockquote>
<p>首先，你的电脑中应该默认配置好 java 的开发环境，没有配置的朋友请<span class="exturl" data-url="aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L20wXzUxMjY5OTYxL2FydGljbGUvZGV0YWlscy8xMTg4NzU5Njc=">参考这里<i class="fa fa-external-link-alt"></i></span></p>
<h1 id="tomcat-安装配置"><a href="#tomcat-安装配置" class="headerlink" title="tomcat 安装配置"></a>tomcat 安装配置</h1><h2 id="简介"><a href="#简介" class="headerlink" title="简介"></a>简介</h2><blockquote>
<p>Tomcat是由Apache软件基金会属下Jakarta项目开发的Servlet容器，按照Sun Microsystems提供的技术规范，实现了对Servlet和JavaServer Page（JSP）的支持，并提供了作为Web服务器的一些特有功能，如Tomcat管理和控制平台、安全局管理和Tomcat阀等。由于Tomcat本身也内含了HTTP服务器，因此也可以视作单独的Web服务器。但是，不能将Tomcat和Apache HTTP服务器混淆，Apache HTTP服务器是用C语言实现的HTTPWeb服务器；这两个HTTP web server不是捆绑在一起的。Apache Tomcat包含了配置管理工具，也可以通过编辑XML格式的配置文件来进行配置。(源 : Wikipedia)</p>
</blockquote>
<p>总结来说就是免费、开源、轻量的 Web 服务器</p>
<span id="more"></span>

<h2 id="下载安装"><a href="#下载安装" class="headerlink" title="下载安装"></a>下载安装</h2><blockquote>
<p>这里建议，不要下载最新版！！</p>
</blockquote>
<p>大家也可以根据开发环境选择合适的版本</p>
<p><img src="https://img-blog.csdnimg.cn/1633f99f73ae4af68dd7144c0c4234a7.png"></p>
<p><span class="exturl" data-url="aHR0cHM6Ly90b21jYXQuYXBhY2hlLm9yZy9kb3dubG9hZC04MC5jZ2k=">官网地址<i class="fa fa-external-link-alt"></i></span>，找到图示位置下载</p>
<p><img src="https://img-blog.csdnimg.cn/fd5cf20cd4f7486b806d043a279d5a43.png"></p>
<p>下载后解压，放到合适位置（记住路径，后面需要用）</p>
<h2 id="系统环境配置"><a href="#系统环境配置" class="headerlink" title="系统环境配置"></a>系统环境配置</h2><p>打开系统环境变量，添加表中两项，变量值为 tomcat 文件路径</p>
<table>
<thead>
<tr>
<th>变量</th>
<th>值</th>
</tr>
</thead>
<tbody><tr>
<td>CATALINA_HOME</td>
<td>C:\IDE\apache-tomcat-8.5.77</td>
</tr>
<tr>
<td>CATALINA_BASE</td>
<td>C:\IDE\apache-tomcat-8.5.77</td>
</tr>
</tbody></table>
<p><img src="https://img-blog.csdnimg.cn/f21a2a5711ad4751bf3ad9035183b312.png"></p>
<p>继续打开 <code>Path</code> 变量，追加两项，注意 <code>;</code> 分隔<br> <code>%CATALINA_HOME%\lib</code>       <code>%CATALINA_HOME%\bin</code></p>
<p><img src="https://img-blog.csdnimg.cn/7bec4f222036426ab871235ce03c3c27.png"></p>
<p>在 tomcat 安装目录 <code>bin</code> 目录下，打开终端，运行指令</p>
<figure class="highlight bash"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br></pre></td><td class="code"><pre><span class="line">$ 安装 tomcat 服务</span><br><span class="line">service.bat install</span><br></pre></td></tr></table></figure>

<p><img src="https://img-blog.csdnimg.cn/8748c1d0354c4ead81c4cfd555831bbe.png"></p>
<p><code>Win+R</code>  执行  <code>services.msc</code> 打开服务窗口，修改 tomcat 启动方式为自动</p>
<p><img src="https://img-blog.csdnimg.cn/f7d937cd8e0749b29bee15e24fd24680.png"></p>
<p>可以在安装目录下启动 <code>tomcat8w.exe</code> 程序控制&#x2F;查看运行状态</p>
<p><img src="https://img-blog.csdnimg.cn/b10cb4d94b6d4b0e86aa56f77c46ae24.png"></p>
<p>访问 <code>http://localhost:8080/</code> 网址，显示图示页面即配置成功</p>
<p><img src="https://img-blog.csdnimg.cn/a21bfa06e3eb4539a8688e05cd9d5163.png"></p>
<h2 id="优化配置"><a href="#优化配置" class="headerlink" title="优化配置"></a>优化配置</h2><blockquote>
<p>此部分操作不建议初次上手直接操作，请在实际需求中进行更改，初次配置可略过该项</p>
</blockquote>
<h3 id="修改默认内存"><a href="#修改默认内存" class="headerlink" title="修改默认内存"></a>修改默认内存</h3><p>在实际开发中可能会遇到默认 128MB 内存不够用的情况，我们需要调大默认容量</p>
<p>打开图示路径</p>
<p><img src="https://img-blog.csdnimg.cn/0105f6cb411942bc9c006412d68ed966.png"></p>
<p>打开后搜索 <code>JAVA_OPTS</code>，将默认位置内容修改为 <code>JAVA_OPTS=&#39;-Xms256m - Xmx512m&#39;</code> ，表示初始化内存为 256MB，可用最大内存为 512MB</p>
<p><img src="https://img-blog.csdnimg.cn/b7ec853846e046e2bc453add8fbe177f.png"></p>
<h3 id="管理员用户名和密码设置"><a href="#管理员用户名和密码设置" class="headerlink" title="管理员用户名和密码设置"></a>管理员用户名和密码设置</h3><p>进入图示目录，打开 <code>tomcat-users.xml</code> 文件</p>
<p><img src="https://img-blog.csdnimg.cn/d4cc654ad19b4fb5a1512fd5f973c684.png"></p>
<p>搜索 <code>username</code> ，在 <code>password</code> 处设置密码</p>
<p><img src="https://img-blog.csdnimg.cn/2713da7d5cb144468a8e99a775f1c7d7.png"></p>
<h3 id="支持中文文件名称"><a href="#支持中文文件名称" class="headerlink" title="支持中文文件名称"></a>支持中文文件名称</h3><p>一般情况下，我们如果在使用 tomcat 时，打开的文件以中文命名或超链接中下载含中文名，会出现乱码，这时我们修改下对应配置文件解决该问题</p>
<p>打开图示文件</p>
<p><img src="https://img-blog.csdnimg.cn/d7db5cd5fbe0465993579118c04ec35d.png"></p>
<p>定位到 <code>Connector port ...</code> 位置处添加 <code>URLEncoding=&quot;UTF-8&quot;</code> 即可</p>
<p><img src="https://img-blog.csdnimg.cn/d0250953d7c942caae90b883b2ec524c.png"></p>
<h1 id="idea-配置-tomcat-并发布-web-项目"><a href="#idea-配置-tomcat-并发布-web-项目" class="headerlink" title="idea 配置 tomcat 并发布 web 项目"></a>idea 配置 tomcat 并发布 web 项目</h1><h2 id="项目创建"><a href="#项目创建" class="headerlink" title="项目创建"></a>项目创建</h2><p>新建 Java 项目</p>
<p><img src="https://img-blog.csdnimg.cn/5f3b446246c24904b4f5081f1aa6be0a.png"></p>
<p>添加项目路径</p>
<p><img src="https://img-blog.csdnimg.cn/18f06186964244b4aaaf86fa238a5562.png"></p>
<p>添加 web 框架支持</p>
<p><img src="https://img-blog.csdnimg.cn/ccf6902b906740bd9cc1116d31ffb4d8.png"></p>
<p>选择 web 标准</p>
<p><img src="https://img-blog.csdnimg.cn/58254a8ba44d42e2877a9f908a6532ea.png"></p>
<p>查看当前的项目结构</p>
<p><img src="https://img-blog.csdnimg.cn/84cbfd6e98d44b0586eea75073425adf.png"></p>
<p>目录文件解释：</p>
<ul>
<li>src ：存放类源目录</li>
<li>web ：虚拟路径，存放静态、动态网页目录</li>
<li>WEB-INF：受 Web 容器保护的目录</li>
<li>web.xml ：描述符文件，java web 服务配置文件</li>
</ul>
<h2 id="为项目添加-tomcat"><a href="#为项目添加-tomcat" class="headerlink" title="为项目添加 tomcat"></a>为项目添加 tomcat</h2><p>编辑项目配置</p>
<p><img src="https://img-blog.csdnimg.cn/610b5630d1de4ba99ae94f1988aebcd7.png"></p>
<p>添加 <code>Tomcat Server</code>，选择第一个，注意区分版本，否则会有警告信息</p>
<p><img src="https://img-blog.csdnimg.cn/308953b9e2df4ef48a894ecde7872ef2.png"></p>
<p>选中安装路径，IDE 自动识别版本号、端口号等信息</p>
<p><img src="https://img-blog.csdnimg.cn/2b7f4f85734f4e5a9f0131d19c47c9dc.png"></p>
<p>部署信息</p>
<p><img src="https://img-blog.csdnimg.cn/4dd0d126d7c4446882a6d24b68d5f396.png"></p>
<p>设置项目名称，此处如果配置，那么访问的 URL 则为 <code>http://localhost:8080/[项目名]/...</code>；若设置为 <code>/</code> ，则访问的 URL 为 <code>http://localhost:8080/...</code></p>
<p>&#x3D;&#x3D;建议配置，以免每次系统默认生成的名字造成 Tomcat 访问报 404 错误&#x3D;&#x3D;</p>
<p><img src="https://img-blog.csdnimg.cn/88df27ee80e84513b34f0752b2049091.png"></p>
<p>其他信息配置</p>
<p><img src="https://img-blog.csdnimg.cn/8d9a9674f6fd48389eb60215acb09637.png"></p>
<p>此时，一个 web 项目的基本配置完成</p>
<h2 id="发布测试"><a href="#发布测试" class="headerlink" title="发布测试"></a>发布测试</h2><p>启动服务</p>
<p><img src="https://img-blog.csdnimg.cn/8f2f38ed291a42eaa19060e16b78f5ca.png"></p>
<p>执行信息</p>
<p><img src="https://img-blog.csdnimg.cn/1ecae667f74a4204888d3adafb39e445.png"></p>
<p>打开浏览器访问(执行成功可以自动跳转) <code>http://localhost:8080/</code> </p>
<p><img src="https://img-blog.csdnimg.cn/fd2c5ff2835e43d49c38b17c1a0e833b.png"></p>
<p>发布成功！</p>
<h1 id="eclipse-配置-tomcat-并发布-web-项目"><a href="#eclipse-配置-tomcat-并发布-web-项目" class="headerlink" title="eclipse 配置 tomcat 并发布 web 项目"></a>eclipse 配置 tomcat 并发布 web 项目</h1><h2 id="引入-tomcat"><a href="#引入-tomcat" class="headerlink" title="引入 tomcat"></a>引入 tomcat</h2><p>打开首选项</p>
<p><img src="https://img-blog.csdnimg.cn/0af54a05fb3f4a17bfe4834d9f8bf7f6.png"></p>
<p>向下滑找到 <code>Server</code> </p>
<p><img src="https://img-blog.csdnimg.cn/d28fad2b25b44af8a67a3cc599ae4939.png"></p>
<p>选择匹配的 tomcat 版本</p>
<p><img src="https://img-blog.csdnimg.cn/d302ac55d57548779161a79aa7510605.png"></p>
<p>细节配置</p>
<p><img src="https://img-blog.csdnimg.cn/b14bc82068604977898cfb8ccacdd4a5.png"></p>
<p>保存退出</p>
<p><img src="https://img-blog.csdnimg.cn/92a2b4f87e654143980f552cf891e4d0.png"></p>
<h2 id="建立-web-项目"><a href="#建立-web-项目" class="headerlink" title="建立 web 项目"></a>建立 web 项目</h2><p>文件 -&gt; 新建</p>
<p><img src="https://img-blog.csdnimg.cn/760a421c1387496a996d8f5b3f846773.png"></p>
<p>配置项目信息</p>
<p><img src="https://img-blog.csdnimg.cn/50be77d4c5db4e8aa7f5c15908a22357.png"></p>
<p>java 类源文件位置，默认就好</p>
<p><img src="https://img-blog.csdnimg.cn/01ccf84469944eab8a2e0360a4bf1788.png"></p>
<p><img src="https://img-blog.csdnimg.cn/683c038a57104ec8995306a6f9aa1407.png"></p>
<p>单击 finish 完成创建</p>
<h2 id="发布测试-1"><a href="#发布测试-1" class="headerlink" title="发布测试"></a>发布测试</h2><p>首先打开 <code>Servers</code> 面板</p>
<p><img src="https://img-blog.csdnimg.cn/0342282caca44eb0a1a427faede8f01b.png"></p>
<p>定义服务</p>
<p><img src="https://img-blog.csdnimg.cn/4da965e326794b98aa7bb18820c17ec1.png"></p>
<p>点击 <code>Next</code> ，选中服务名称添加</p>
<p><img src="https://img-blog.csdnimg.cn/d6b8a3a8a4804c3a843274ba502c2433.png"></p>
<p>在 webapp 目录下新建一个 <code>.jsp</code>  文件</p>
<p><img src="https://img-blog.csdnimg.cn/247480391ca14e3ba4582b98bab9a2bb.png"></p>
<p><img src="https://img-blog.csdnimg.cn/fa83efcfe39f445eab1cb426b5d05468.png"></p>
<p>写入测试程序(记得保存)，测试服务状态</p>
<figure class="highlight jsp"><table><tr><td class="gutter"><pre><span class="line">1</span><br><span class="line">2</span><br><span class="line">3</span><br><span class="line">4</span><br><span class="line">5</span><br><span class="line">6</span><br><span class="line">7</span><br><span class="line">8</span><br><span class="line">9</span><br><span class="line">10</span><br><span class="line">11</span><br><span class="line">12</span><br><span class="line">13</span><br><span class="line">14</span><br><span class="line">15</span><br><span class="line">16</span><br></pre></td><td class="code"><pre><span class="line">&lt;%--</span><br><span class="line">  Created by Eclipse</span><br><span class="line">  User: jason</span><br><span class="line">  Date: <span class="number">2022</span>/<span class="number">3</span>/<span class="number">22</span></span><br><span class="line">  Time: <span class="number">19</span>:<span class="number">27</span></span><br><span class="line">  To change <span class="built_in">this</span> template use File | Settings | File Templates.</span><br><span class="line">--%&gt;</span><br><span class="line">&lt;%@ page contentType=<span class="string">&quot;text/html;charset=UTF-8&quot;</span> language=<span class="string">&quot;java&quot;</span> %&gt;</span><br><span class="line">&lt;html&gt;</span><br><span class="line">  &lt;head&gt;</span><br><span class="line">    &lt;title&gt;java-web-project&lt;/title&gt;</span><br><span class="line">  &lt;/head&gt;</span><br><span class="line">  &lt;body&gt;</span><br><span class="line">  Congratulations!! settings successful.</span><br><span class="line">  &lt;/body&gt;</span><br><span class="line">&lt;/html&gt;</span><br></pre></td></tr></table></figure>

<p>启动服务</p>
<p><img src="https://img-blog.csdnimg.cn/3791a1889b1049ecb119db366f20f2a8.png"></p>
<p>可以在 <code>Console</code> 面板下查看到执行信息</p>
<p><img src="https://img-blog.csdnimg.cn/61025170b1514f6ba0832fef4cda178b.png"></p>
<p>浏览器地址栏输入 <code>http://localhost:8080/test/test.jsp</code> 即可访问</p>
<blockquote>
<p>文件 test&#x2F;test.jsp : 第一个 test 即为上述 Web Module 处设置的 Context root 名称</p>
</blockquote>
<p><img src="https://img-blog.csdnimg.cn/43fc9b96e5984070bf040dc37c6e946d.png"></p>
<h1 id="总结"><a href="#总结" class="headerlink" title="总结"></a>总结</h1><p>其实花了这么多时间我是比较意外的，最后发现本地 java 版本太多，一开始没有去仔细配置好对应的版本，太过于依赖 IDE</p>
<p>安装 tomcat 时也是首先去进行了 <strong>优化配置</strong> 像设置缓存、配置密码这些，其实我们首先应该让项目跑起来，日后再去不断提升安全性之类的问题</p>
<p>遇到问题，我们也要学着不断总结，不断试错，不论多么小的错误都不要轻视。因为这点点滴滴都是经验的不断积累。今天错了，日后保证不再出错，效率才会不断提升。遇到问题欢迎大家留言讨论，加油！！</p>
<hr>
<p>参考资料：</p>
<ul>
<li><span class="exturl" data-url="aHR0cHM6Ly9ibG9nLmNzZG4ubmV0L3dlaXhpbl80Mjk1NzkzMS9hcnRpY2xlL2RldGFpbHMvMTA4MDg2Njg4">Error running ‘Tomcat 8.5.57‘: Address localhost:8080 is already in use<i class="fa fa-external-link-alt"></i></span></li>
<li><span class="exturl" data-url="aHR0cHM6Ly93d3cuY29kZWxlYWRpbmcuY29tL2FydGljbGUvNjcwNDUyNTY1MzYv">Application Server was not connected before run configuration stop, reason: Unable to ping server at<i class="fa fa-external-link-alt"></i></span></li>
<li><span class="exturl" data-url="aHR0cHM6Ly9zdGFja292ZXJmbG93LmNvbS9xdWVzdGlvbnMvMjkwMzczMjcvaW50ZWxsaWotaWRlYS10b21jYXQtYXBwbGljYXRpb24tc2VydmVyLXdhcy1ub3QtY29ubmVjdGVkLWJlZm9yZS1ydW4tY29uZmlndXJhdGk=">Intellij IDEA Tomcat Application Server was not connected before run configuration stop, reason: Unable to ping server at localhost:1099<i class="fa fa-external-link-alt"></i></span></li>
<li><span class="exturl" data-url="aHR0cHM6Ly93d3cuY25ibG9ncy5jb20vc2hlbnl1YW5mZW5nL3AvMTE4MzE1NzEuaHRtbA==">Windows 查看端口占用进程并关闭<i class="fa fa-external-link-alt"></i></span></li>
</ul>

    </div>

    
    
    

    <footer class="post-footer">

        </br>
        <div class="official-accounts">
             <a target="_blank" rel="noopener" href="https://cdn.jsdelivr.net/gh/PDPENG/jason-storage/blog-img/Jason%20wechat%20account.png">
                 <img src="/images/official-accounts.png" width="80%">
             </a>
        </div>
          <div class="reward-container">
  <div>Thank you for your support to Jason ~</div>
  <button>
    赞赏
  </button>
  <div class="post-reward">
      <div>
        <img src="/images/wechatpay.png" alt="董哲朋 微信">
        <span>微信</span>
      </div>
      <div>
        <img src="/images/alipay.png" alt="董哲朋 支付宝">
        <span>支付宝</span>
      </div>

  </div>
</div>

          

<div class="post-copyright">
<ul>
  <li class="post-copyright-author">
      <strong>本文作者： </strong>董哲朋
  </li>
  <li class="post-copyright-link">
      <strong>本文链接：</strong>
      <a href="https://pdpeng.github.io/2022/03/22/idea-eclips-web-project/" title="idea 及 eclipse 配置 Tomcat 并发布 Web 项目">https://pdpeng.github.io/2022/03/22/idea-eclips-web-project/</a>
  </li>
  <li class="post-copyright-license">
    <strong>版权声明： </strong>本博客所有文章除特别声明外，均采用 <span class="exturl" data-url="aHR0cHM6Ly9jcmVhdGl2ZWNvbW1vbnMub3JnL2xpY2Vuc2VzL2J5LW5jLXNhLzQuMC8="><i class="fab fa-fw fa-creative-commons"></i>BY-NC-SA</span> 许可协议。转载请注明出处！
  </li>
</ul>
</div>

          <div class="post-tags">
              <a href="/tags/Tomcat/" rel="tag"><i class="fa fa-tag"></i> Tomcat</a>
          </div>

        

          <div class="post-nav">
            <div class="post-nav-item">
                <a href="/2022/03/24/git-ssh-code/" rel="prev" title="使用 SSH 方式拉取代码">
                  <i class="fa fa-chevron-left"></i> 使用 SSH 方式拉取代码
                </a>
            </div>
            <div class="post-nav-item">
                <a href="/2022/03/22/run-jar-file/" rel="next" title="双击运行 jar 文件">
                  双击运行 jar 文件 <i class="fa fa-chevron-right"></i>
                </a>
            </div>
          </div>
    </footer>
  </article>
</div>






    <div class="comments utterances-container"></div>
</div>
  </main>

  <footer class="footer">
    <div class="footer-inner">
<div class="copyright">
  &copy; 2020 – 
  <span itemprop="copyrightYear">2025</span>
  <span class="with-love">
    <i class="fa fa-code"></i>
  </span>
  <span class="author" itemprop="copyrightHolder">董哲朋


<div class="sitetime" style="display: inline-block;">
<span id="sitetime"></span>
<script language=javascript>
	function siteTime(){
		window.setTimeout("siteTime()", 1000);
		var seconds = 1000;
		var minutes = seconds * 60;
		var hours = minutes * 60;
		var days = hours * 24;
		var years = days * 365;
		var today = new Date();
		var todayYear = today.getFullYear();
		var todayMonth = today.getMonth()+1;
		var todayDate = today.getDate();
		var todayHour = today.getHours();
		var todayMinute = today.getMinutes();
		var todaySecond = today.getSeconds();
		var t1 = Date.UTC(2020,09,23,13,15,00); //北京时间 2021-09-23 13:15:00
		var t2 = Date.UTC(todayYear,todayMonth,todayDate,todayHour,todayMinute,todaySecond);
		var diff = t2-t1;
		var diffYears = Math.floor(diff/years);
		var diffDays = Math.floor((diff/days)-diffYears*365);
		var diffHours = Math.floor((diff-(diffYears*365+diffDays)*days)/hours);
		var diffMinutes = Math.floor((diff-(diffYears*365+diffDays)*days-diffHours*hours)/minutes);
		var diffSeconds = Math.floor((diff-(diffYears*365+diffDays)*days-diffHours*hours-diffMinutes*minutes)/seconds);
		document.getElementById("sitetime").innerHTML=" 本站已安全运行 "+diffYears+" 年 "+diffDays+" 天 "+diffHours+" 小时 "+diffMinutes+" 分钟 "+diffSeconds+" 秒 ";
	}
	siteTime();
</script>
</div>
  </span>
</div>
<div class="wordcount" style="display: inline-block;">
  <span class="post-meta-item">
    <span class="post-meta-item-icon">
      <i class="fa fa-chart-line"></i>
    </span>
      <span>站点总字数：</span>
    <span title="站点总字数">312k</span>
  </span>
  <span class="post-meta-item">
    <span class="post-meta-item-icon">
      <i class="fa fa-coffee"></i>
    </span>
      <span>站点阅读时长 &asymp;</span>
    <span title="站点阅读时长">4:43</span>
  </span>
    <div class="beian" style="display: inline-block;">
        <img src="/images/beian.png" alt=""><span class="exturl" data-url="aHR0cDovL3d3dy5iZWlhbi5nb3YuY24vcG9ydGFsL3JlZ2lzdGVyU3lzdGVtSW5mbz9yZWNvcmRjb2RlPTQxMDU4MTAyMDAwMjQx">豫公网安备 41058102000241号 </span>
        <img src="/images/beian.png" alt=""><span class="exturl" data-url="aHR0cHM6Ly9iZWlhbi5taWl0Lmdvdi5jbg==">豫ICP备2021028259号-1 </span>
    </div>

</div>

    </div>
  </footer>

  
  <script src="https://cdn.jsdelivr.net/npm/animejs@3.2.1/lib/anime.min.js" integrity="sha256-XL2inqUJaslATFnHdJOi9GfQ60on8Wx1C2H8DYiN1xY=" crossorigin="anonymous"></script>
  <script src="https://cdn.jsdelivr.net/npm/@next-theme/pjax@0.5.0/pjax.min.js" integrity="sha256-3NkoLDrmHLTYj7csHIZSr0MHAFTXth7Ua/DDt4MRUAg=" crossorigin="anonymous"></script>
  <script src="https://cdn.jsdelivr.net/npm/jquery@3.6.0/dist/jquery.min.js" integrity="sha256-/xUj+3OJU5yExlq6GSYGSHk7tPXikynS7ogEvDej/m4=" crossorigin="anonymous"></script>
  <script src="https://cdn.jsdelivr.net/npm/@fancyapps/fancybox@3.5.7/dist/jquery.fancybox.min.js" integrity="sha256-yt2kYMy0w8AbtF89WXb2P1rfjcP/HTHLT7097U8Y5b8=" crossorigin="anonymous"></script>
<script src="/js/comments.js"></script><script src="/js/utils.js"></script><script src="/js/motion.js"></script><script src="/js/schemes/muse.js"></script><script src="/js/next-boot.js"></script><script src="/js/pjax.js"></script>

  
<script src="https://cdn.jsdelivr.net/npm/hexo-generator-searchdb@1.4.0/dist/search.js" integrity="sha256-vXZMYLEqsROAXkEw93GGIvaB2ab+QW6w3+1ahD9nXXA=" crossorigin="anonymous"></script>
<script src="/js/third-party/search/local-search.js"></script>



  <script src="/js/third-party/fancybox.js"></script>


  


  <script class="next-config" data-name="leancloud_visitors" type="application/json">{"enable":true,"app_id":"XnAU2LpE7JlHt34KKmw24BoM-MdYXbMMI","app_key":"vphcyLncudT8YkHIgks4F1r2","server_url":null,"security":false}</script>
  <script src="/js/third-party/statistics/lean-analytics.js"></script>


  

  <script class="next-config" data-name="enableMath" type="application/json">false</script><script class="next-config" data-name="mathjax" type="application/json">{"enable":true,"tags":"none","js":{"url":"https://cdn.jsdelivr.net/npm/mathjax@3.2.0/es5/tex-mml-chtml.js","integrity":"sha256-r+3itOMtGGjap0x+10hu6jW/gZCzxHsoKrOd7gyRSGY="}}</script>
<script src="/js/third-party/math/mathjax.js"></script>


<script src="https://cdn.jsdelivr.net/gh/PDPENG/live2d-widget@latest/autoload.js"></script><script class="next-config" data-name="utterances" type="application/json">{"enable":true,"repo":"PDPENG/pdpeng.github.io","issue_term":"pathname","theme":"preferred-color-scheme"}</script>
<script src="/js/third-party/comments/utterances.js"></script>

</body>
</html>
